﻿using System.Web.Routing;

namespace System.Web.Mvc
{
	/// <summary>
	/// Simple constraint that only matches incoming requests.
	/// </summary>
	public class IncomingOnlyRouteConstraint : IRouteConstraint
	{
		public bool Match(HttpContextBase httpContext, Route route, string parameterName, RouteValueDictionary values, RouteDirection routeDirection)
		{
			return routeDirection == RouteDirection.IncomingRequest;
		}
	}
}
